import { Singleton } from "./Singleton";

export class SystemParams extends Singleton{
    private _value_map:any={}
    private _bundle_verison_map:any={}
    
    /**
     * 添加bundle版本
     * @param key       bundle对应的key
     * @param value     对应的value
     */
    public putBundleVerison(key:string,value:any){
        if(this._bundle_verison_map)this._bundle_verison_map[key]=value
    }
    /**
     * 获取bundle版本数据
     * @param key 
     * @returns 
     */
    public getBundleVerison(key:string):any{return this._bundle_verison_map[key] || null;}

    /**
     * 设置数据
     * @param key 
     * @param value 
     */
    public setValue(key:string,value:any){
        this._value_map[key]=value;
    }
    /**
     * 获取数据
     * @param key 
     * @returns 
     */
    public getValue(key:string):any{
        return this._value_map[key]
    }
    
}